<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: zhanghz001
  Date: 2020/11/3
  Time: 15:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>主页</title>
</head>
<body>
<%--<%--%>
<%--    Object username = session.getAttribute("username");--%>
<%--    if (username == null) {--%>
<%--        response.sendRedirect("/login.jsp");--%>
<%--    } else {--%>
<%--        response.sendRedirect("/listStudent");--%>
<%--    }--%>
<%--%>--%>
<c:if test="${sessionScope.username eq null }">
    <a href="${pageContext.request.contextPath}/login.jsp">请登录</a>
</c:if>
<c:if test="${sessionScope.username ne null}">
    <a href="${pageContext.request.contextPath}/listStudent">展示列表</a>
    <a href="${pageContext.request.contextPath}/addStudent.jsp">添加学生</a>
</c:if>
</body>

</html>
